home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / ModCreateMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  21.5 KB  |  687 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  Dec 1998
  22. //
  23. //
  24. //
  25. //  Procedure Name:
  26. //      ModCreateMenu
  27. //
  28. //  Description:
  29. //        Create the MODELLING->Create menu
  30. //
  31. //  Input Arguments:
  32. //      parent to parent the menu to.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38. proc ModNurbsPrimitiveMenuItem( string $parent )
  39. //
  40. //    Proc : To create NURBS primitives.
  41. //
  42. {
  43.     setParent -menu $parent;
  44.  
  45.     if (`isTrue "NurbsExists"`) {
  46.         menuItem -label "NURBS Primitives" -subMenu true -tearOff true 
  47.             -allowOptionBoxes true;
  48.  
  49.         if (`isTrue "SurfaceUIExists"`) {
  50.  
  51.             menuItem -label "Sphere"
  52.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSSphere"))
  53.                 -image      "sphere.xpm"
  54.                 -command    ("CreateNURBSSphere")
  55.                 -dragMenuCommand        ("performNurbsSphere(2)")
  56.                 -dragDoubleClickCommand ("CreateNURBSSphereOptions");
  57.  
  58.             menuItem -optionBox true
  59.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSSphereOptions"))
  60.                 -image      "sphere.xpm"
  61.                 -command    ("CreateNURBSSphereOptions");
  62.  
  63.             menuItem -label "Cube"
  64.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSCube"))
  65.                 -image      "cube.xpm"
  66.                 -command    ("CreateNURBSCube")
  67.                 -dragMenuCommand        ("performNurbsCube(2)")
  68.                 -dragDoubleClickCommand ("CreateNURBSCubeOptions");
  69.  
  70.             menuItem -optionBox true
  71.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSCubeOptions"))
  72.                 -image      "cube.xpm"
  73.                 -command    ("CreateNURBSCubeOptions");
  74.  
  75.              menuItem -label "Cylinder"
  76.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSCylinder"))
  77.                 -image      "cylinder.xpm"
  78.                 -command    ("CreateNURBSCylinder")
  79.                 -dragMenuCommand        ("performNurbsCylinder(2)")
  80.                 -dragDoubleClickCommand ("CreateNURBSCylinderOptions");
  81.  
  82.             menuItem -optionBox true
  83.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSCylinderOptions"))
  84.                 -image      "cylinder.xpm"
  85.                 -command    ("CreateNURBSCylinderOptions");
  86.  
  87.             menuItem -label "Cone"
  88.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSCone"))
  89.                 -image      "cone.xpm"
  90.                 -command    ("CreateNURBSCone")
  91.                 -dragMenuCommand        ("performNurbsCone(2)")
  92.                 -dragDoubleClickCommand ("CreateNURBSConeOptions");
  93.  
  94.             menuItem -optionBox true
  95.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSConeOptions"))
  96.                 -image      "cone.xpm"
  97.                 -command    ("CreateNURBSConeOptions");
  98.  
  99.             menuItem -label "Plane"
  100.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSPlane"))
  101.                 -image      "plane.xpm"
  102.                 -command    ("CreateNURBSPlane")
  103.                 -dragMenuCommand        ("performNurbsPlane(2)")
  104.                 -dragDoubleClickCommand ("CreateNURBSPlaneOptions");
  105.  
  106.             menuItem -optionBox true
  107.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSPlaneOptions"))
  108.                 -image      "plane.xpm"
  109.                 -command    ("CreateNURBSPlaneOptions");
  110.  
  111.              menuItem -label "Torus"
  112.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSTorus"))
  113.                 -image      "torus.xpm"
  114.                 -command    ("CreateNURBSTorus")
  115.                 -dragMenuCommand        ("performNurbsTorus(2)")
  116.                 -dragDoubleClickCommand ("CreateNURBSTorusOptions");
  117.  
  118.             menuItem -optionBox true
  119.                 -annotation (getRunTimeCommandAnnotation("CreateNURBSTorusOptions"))
  120.                 -image      "torus.xpm"
  121.                 -command    ("CreateNURBSTorusOptions");
  122.         }
  123.  
  124.         menuItem -label "Circle"
  125.             -annotation (getRunTimeCommandAnnotation("CreateNURBSCircle"))
  126.             -image      "circle.xpm"
  127.             -command    ("CreateNURBSCircle")
  128.             -dragMenuCommand        ("performNurbsCircle(2)")
  129.             -dragDoubleClickCommand ("CreateNURBSCircleOptions");
  130.  
  131.         menuItem -optionBox true
  132.             -annotation (getRunTimeCommandAnnotation("CreateNURBSCircleOptions"))
  133.             -image      "circle.xpm"
  134.             -command    ("CreateNURBSCircleOptions");
  135.  
  136.         menuItem -label "Square"
  137.             -annotation (getRunTimeCommandAnnotation("CreateNURBSSquare"))
  138.             -image      "square.xpm"
  139.             -command    ("CreateNURBSSquare")
  140.             -dragMenuCommand        ("performNurbsSquare(2)")
  141.             -dragDoubleClickCommand ("CreateNURBSSquareOptions");
  142.  
  143.         menuItem -optionBox true
  144.             -annotation (getRunTimeCommandAnnotation("CreateNURBSSquareOptions"))
  145.             -image      "square.xpm"
  146.             -command    ("CreateNURBSSquareOptions");
  147.  
  148.         setParent -menu .. ;
  149.     }
  150.     setParent -menu .. ;
  151. }
  152.  
  153.  
  154. proc ModPolyPrimitiveMenuItem( string $parent ) 
  155. //
  156. //     Description :
  157. //        To create Poly primitives menu.
  158. //
  159. {
  160.     setParent -menu $parent;
  161.     if( `isTrue "PolygonsExists"` ) {
  162.  
  163.         menuItem -label "Polygon Primitives" -subMenu true -tearOff true 
  164.             -allowOptionBoxes true polyPrimitivesItem;
  165.  
  166.         menuItem -label "Sphere"
  167.             -annotation (getRunTimeCommandAnnotation("CreatePolygonSphere"))
  168.             -image      "polySphere.xpm"
  169.             -command    ("CreatePolygonSphere")
  170.             -dragMenuCommand        ("performPolyPrimitive Sphere 2")
  171.             -dragDoubleClickCommand ("CreatePolygonSphereOptions");
  172.  
  173.         menuItem -optionBox true
  174.             -annotation (getRunTimeCommandAnnotation("CreatePolygonSphereOptions"))
  175.             -image      "polySphere.xpm"
  176.             -command    ("CreatePolygonSphereOptions");
  177.  
  178.         menuItem -label "Cube"
  179.             -annotation (getRunTimeCommandAnnotation("CreatePolygonCube"))
  180.             -image      "polyCube.xpm"
  181.             -command    ("CreatePolygonCube")
  182.             -dragMenuCommand        ("performPolyPrimitive Cube 2")
  183.             -dragDoubleClickCommand ("CreatePolygonCubeOptions");
  184.  
  185.         menuItem -optionBox true
  186.             -annotation (getRunTimeCommandAnnotation("CreatePolygonCubeOptions"))
  187.             -image      "polyCube.xpm"
  188.             -command    ("CreatePolygonCubeOptions");
  189.  
  190.         menuItem -label "Cylinder"
  191.             -annotation (getRunTimeCommandAnnotation("CreatePolygonCylinder"))
  192.             -image      "polyCylinder.xpm"
  193.             -command    ("CreatePolygonCylinder")
  194.             -dragMenuCommand        ("performPolyPrimitive Cylinder 2")
  195.             -dragDoubleClickCommand ("CreatePolygonCylinderOptions");
  196.  
  197.         menuItem -optionBox true
  198.             -annotation (getRunTimeCommandAnnotation("CreatePolygonCylinderOptions"))
  199.             -image      "polyCylinder.xpm"
  200.             -command    ("CreatePolygonCylinderOptions");
  201.  
  202.         menuItem -label "Cone"
  203.             -annotation (getRunTimeCommandAnnotation("CreatePolygonCone"))
  204.             -image      "polyCone.xpm"
  205.             -command    ("CreatePolygonCone")
  206.             -dragMenuCommand        ("performPolyPrimitive Cone 2")
  207.             -dragDoubleClickCommand ("CreatePolygonConeOptions");
  208.  
  209.         menuItem -optionBox true
  210.             -annotation (getRunTimeCommandAnnotation("CreatePolygonConeOptions"))
  211.             -image      "polyCone.xpm"
  212.             -command    ("CreatePolygonConeOptions");
  213.  
  214.         menuItem -label "Plane"
  215.             -annotation (getRunTimeCommandAnnotation("CreatePolygonPlane"))
  216.             -image      "polyMesh.xpm"
  217.             -command    ("CreatePolygonPlane")
  218.             -dragMenuCommand        ("performPolyPrimitive Plane 2")
  219.             -dragDoubleClickCommand ("CreatePolygonPlaneOptions");
  220.  
  221.         menuItem -optionBox true
  222.             -annotation (getRunTimeCommandAnnotation("CreatePolygonPlaneOptions"))
  223.             -image      "polyMesh.xpm"
  224.             -command    ("CreatePolygonPlaneOptions");
  225.  
  226.         menuItem -label "Torus"
  227.             -annotation (getRunTimeCommandAnnotation("CreatePolygonTorus"))
  228.             -image      "polyTorus.xpm"
  229.             -command    ("CreatePolygonTorus")
  230.             -dragMenuCommand        ("performPolyPrimitive Torus 2")
  231.             -dragDoubleClickCommand ("CreatePolygonTorusOptions");
  232.  
  233.         menuItem -optionBox true
  234.             -annotation (getRunTimeCommandAnnotation("CreatePolygonTorusOptions"))
  235.             -image      "polyTorus.xpm"
  236.             -command    ("CreatePolygonTorusOptions");
  237.  
  238.         setParent -menu ..;
  239.     }
  240.     setParent -menu .. ;
  241. }
  242.  
  243.  
  244.  
  245. proc ModSubdPrimitiveMenuItem( string $parent )
  246. //
  247. //     Description :
  248. //        To create Subd primitives menu.
  249. //        Added by CM
  250. //
  251. {
  252.     setParent -menu $parent;
  253.     if( `isTrue "SubdivUIExists"` ) {
  254.  
  255.         menuItem -label "Subdiv Primitives" -subMenu true -tearOff true 
  256.             -allowOptionBoxes true subdPrimitivesItem;
  257.  
  258.         menuItem -label "Sphere"
  259.             -annotation (getRunTimeCommandAnnotation("CreateSubdivSphere"))
  260.             -image      "subdivSphere.xpm"
  261.             -command    ("CreateSubdivSphere");
  262.  
  263.         menuItem -label "Cube"
  264.             -annotation (getRunTimeCommandAnnotation("CreateSubdivCube"))
  265.             -image      "subdivCube.xpm"
  266.             -command    ("CreateSubdivCube");
  267.  
  268.         menuItem -label "Cylinder"
  269.             -annotation (getRunTimeCommandAnnotation("CreateSubdivCylinder"))
  270.             -image      "subdivCylinder.xpm"
  271.             -command    ("CreateSubdivCylinder");
  272.         
  273.         menuItem -label "Cone"
  274.             -annotation (getRunTimeCommandAnnotation("CreateSubdivCone"))
  275.             -image      "subdivCone.xpm"
  276.             -command    ("CreateSubdivCone");
  277.  
  278.         menuItem -label "Plane"
  279.             -annotation (getRunTimeCommandAnnotation("CreateSubdivPlane"))
  280.             -image      "subdivPlane.xpm"
  281.             -command    ("CreateSubdivPlane");
  282.  
  283.         menuItem -label "Torus"
  284.             -annotation (getRunTimeCommandAnnotation("CreateSubdivTorus"))
  285.             -image      "subdivTorus.xpm"
  286.             -command    ("CreateSubdivTorus");
  287.  
  288.         setParent -menu ..;
  289.     }
  290.     setParent -menu .. ;
  291. }
  292.  
  293.  
  294.  
  295. proc ModVolumePrimitiveMenuItem( string $parent ) 
  296. //
  297. //     Description :
  298. //        To create Volume primitives menu.
  299. //
  300. {
  301.     setParent -menu $parent;
  302.     if( `isTrue "PolygonsExists"` ) {
  303.  
  304.         menuItem -label "Volume Primitives" -subMenu true -tearOff true 
  305.             -allowOptionBoxes true volumePrimitivesItem;
  306.  
  307.         menuItem -label "Sphere"
  308.             -annotation (getRunTimeCommandAnnotation("CreateVolumeSphere"))
  309.             -image      "volumeSphere.xpm"
  310.             -command    ("CreateVolumeSphere");
  311.  
  312.         menuItem -label "Cube"
  313.             -annotation (getRunTimeCommandAnnotation("CreateVolumeCube"))
  314.             -image      "volumeCube.xpm"
  315.             -command    ("CreateVolumeCube");
  316.  
  317.         menuItem -label "Cone"
  318.             -annotation (getRunTimeCommandAnnotation("CreateVolumeCone"))
  319.             -image      "volumeCone.xpm"
  320.             -command    ("CreateVolumeCone");
  321.  
  322.         setParent -menu ..;
  323.     }
  324.     setParent -menu .. ;
  325. }
  326.  
  327.  
  328.  
  329.  
  330. proc ModLightsMenuItem( string $parent ) 
  331. //
  332. //     Description :
  333. //        To create Lights menu.
  334. //  Note : Divider added at the end by proc.
  335. //
  336. {
  337.     setParent -menu $parent;
  338.  
  339.     menuItem -label "Lights" -sm true -tearOff true 
  340.         -allowOptionBoxes true LightsItem;
  341.  
  342.     menuItem -label "Ambient Light"
  343.         -annotation (getRunTimeCommandAnnotation("CreateAmbientLight"))
  344.         -image      "ambientlight.xpm"
  345.         -command    ("CreateAmbientLight")
  346.         -dragMenuCommand        ("performAmbientLight 2")
  347.         -dragDoubleClickCommand ("CreateAmbientLightOptions");
  348.  
  349.     menuItem -optionBox true 
  350.         -annotation (getRunTimeCommandAnnotation("CreateAmbientLightOptions"))
  351.         -image      "ambientlight.xpm"
  352.         -command    ("CreateAmbientLightOptions");
  353.  
  354.     menuItem -label "Directional Light"
  355.         -annotation (getRunTimeCommandAnnotation("CreateDirectionalLight"))
  356.         -image      "directionallight.xpm"
  357.         -command    ("CreateDirectionalLight")
  358.         -dragMenuCommand        ("performDirectionalLight 2")
  359.         -dragDoubleClickCommand ("CreateDirectionalLightOptions");
  360.  
  361.     menuItem -optionBox true
  362.         -annotation (getRunTimeCommandAnnotation("CreateDirectionalLightOptions"))
  363.         -image      "directionallight.xpm"
  364.         -command    ("CreateDirectionalLightOptions");
  365.  
  366.     menuItem -label "Point Light"
  367.         -annotation (getRunTimeCommandAnnotation("CreatePointLight"))
  368.         -image      "pointlight.xpm"
  369.         -command    ("CreatePointLight")
  370.         -dragMenuCommand        ("performPointLight 2")
  371.         -dragDoubleClickCommand ("CreatePointLightOptions");
  372.  
  373.     menuItem -optionBox true 
  374.         -annotation (getRunTimeCommandAnnotation("CreatePointLightOptions"))
  375.         -image      "pointlight.xpm"
  376.         -command    ("CreatePointLightOptions");
  377.  
  378.     menuItem -label "Spot Light"
  379.         -annotation (getRunTimeCommandAnnotation("CreateSpotLight"))
  380.         -image      "spotlight.xpm"
  381.         -command    ("CreateSpotLight")
  382.         -dragMenuCommand        ("performSpotLight 2")
  383.         -dragDoubleClickCommand ("CreateSpotLightOptions");
  384.  
  385.     menuItem -optionBox true 
  386.         -annotation (getRunTimeCommandAnnotation("CreateSpotLightOptions"))
  387.         -image      "spotlight.xpm"
  388.         -command    ("CreateSpotLightOptions");
  389.  
  390.     menuItem -label "Area Light"
  391.         -annotation (getRunTimeCommandAnnotation("CreateAreaLight"))
  392.         -image      "arealight.xpm"
  393.         -command    ("CreateAreaLight")
  394.         -dragMenuCommand        ("performAreaLight(2)")
  395.         -dragDoubleClickCommand ("CreateAreaLightOptions");
  396.  
  397.     menuItem -optionBox true 
  398.         -annotation (getRunTimeCommandAnnotation("CreateAreaLightOptions"))
  399.         -image      "arealight.xpm"
  400.         -command    ("CreateAreaLightOptions");
  401.  
  402.     menuItem -label "Volume Light"
  403.         -annotation (getRunTimeCommandAnnotation("CreateVolumeLight"))
  404.         -image      "volumelight.xpm"
  405.         -command    ("CreateVolumeLight")
  406.         -dragMenuCommand        ("performVolumeLight 2")
  407.         -dragDoubleClickCommand ("CreateVolumeLightOptions");
  408.  
  409.     menuItem -optionBox true 
  410.         -annotation (getRunTimeCommandAnnotation("CreateVolumeLightOptions"))
  411.         -image      "volumelight.xpm"
  412.         -command    ("CreateVolumeLightOptions");
  413.  
  414.     setParent -menu ..;
  415.  
  416.     setParent -menu .. ;
  417. }
  418.  
  419.  
  420. proc ModCurveToolsMenuItem( string $parent )
  421. //
  422. //    Description :
  423. //        To create Curve Tools menu. Arc tools included.
  424. //
  425. {
  426.  
  427.     setParent -menu $parent ;
  428.  
  429.     if (`isTrue "NurbsExists"`) {
  430.  
  431.         menuItem -label "CV Curve Tool"
  432.             -annotation (getRunTimeCommandAnnotation("CVCurveTool"))
  433.             -image      "curveCV.xpm"
  434.             -command    ("CVCurveTool")
  435.             -dragDoubleClickCommand ("CVCurveToolOptions");
  436.  
  437.         menuItem -optionBox true -image "curveCV.xpm"
  438.             -annotation (getRunTimeCommandAnnotation("CVCurveToolOptions"))
  439.             -command    ("CVCurveToolOptions");
  440.  
  441.         menuItem -label "EP Curve Tool"
  442.             -annotation (getRunTimeCommandAnnotation("EPCurveTool"))
  443.             -image      "curveEP.xpm"
  444.             -command    ("EPCurveTool")
  445.             -dragDoubleClickCommand ("EPCurveToolOptions");
  446.  
  447.         menuItem -optionBox true -image "curveEP.xpm"
  448.             -annotation (getRunTimeCommandAnnotation("EPCurveToolOptions"))
  449.             -command    ("EPCurveToolOptions");
  450.  
  451.         menuItem -label "Pencil Curve Tool"
  452.             -annotation (getRunTimeCommandAnnotation("PencilCurveTool"))
  453.             -image      "pencil.xpm"
  454.             -command    ("PencilCurveTool")
  455.             -dragDoubleClickCommand ("PencilCurveToolOptions");
  456.  
  457.         menuItem -optionBox true -image "pencil.xpm"
  458.             -annotation (getRunTimeCommandAnnotation("PencilCurveToolOptions"))
  459.             -command    ("PencilCurveToolOptions");
  460.  
  461.         menuItem -label "Arc Tools" -subMenu true -tearOff true 
  462.             -allowOptionBoxes true;    
  463.  
  464.         menuItem -label "Three Point Circular Arc"
  465.             -annotation (getRunTimeCommandAnnotation("ThreePointArcTool"))
  466.                -image      "threePointArc.xpm"
  467.                -command    ("ThreePointArcTool")
  468.             -dragDoubleClickCommand ("ThreePointArcToolOptions");
  469.  
  470.         menuItem -optionBox true -image "threePointArc.xpm"
  471.             -annotation (getRunTimeCommandAnnotation("ThreePointArcToolOptions"))
  472.               -command    ("ThreePointArcToolOptions");
  473.  
  474.            menuItem -label "Two Point Circular Arc"
  475.             -annotation (getRunTimeCommandAnnotation("TwoPointArcTool"))
  476.                -image      "twoPointArc.xpm"
  477.                -command    ("TwoPointArcTool")
  478.             -dragDoubleClickCommand ("TwoPointArcToolOptions");
  479.  
  480.         menuItem -optionBox true -image "twoPointArc.xpm"
  481.             -annotation (getRunTimeCommandAnnotation("TwoPointArcToolOptions"))
  482.                -command    ("TwoPointArcToolOptions");
  483.  
  484.         setParent -menu ..;
  485.  
  486.         menuItem -divider true;
  487.  
  488.         menuItem -label "Measure Tools" -subMenu true -tearOff true measureItem;
  489.  
  490.         menuItem -label "Distance Tool"
  491.             -annotation (getRunTimeCommandAnnotation("DistanceTool"))
  492.             -image      "distanceDim.xpm"
  493.             -command    ("DistanceTool");
  494.  
  495.         menuItem -label "Parameter Tool"
  496.             -annotation (getRunTimeCommandAnnotation("ParameterTool"))
  497.             -image      "paramDim.xpm"
  498.             -command    ("ParameterTool");
  499.  
  500.         menuItem -label "Arc Length Tool"
  501.             -annotation (getRunTimeCommandAnnotation("ArcLengthTool"))
  502.             -image      "arcLengthDim.xpm"
  503.             -command    ("ArcLengthTool");
  504.  
  505.         setParent -menu ..;
  506.  
  507.         // add divider.
  508.         //
  509.         menuItem -divider true ;
  510.     }
  511.     setParent -menu .. ;
  512. }
  513.  
  514. proc ModTextMenuItem( string $parent )
  515. //
  516. //    Description : To create Text menu.
  517. //
  518. {
  519.     setParent -menu $parent ;
  520.     if (`isTrue "NurbsExists"`) {
  521.  
  522.         menuItem
  523.             -label      "Text"
  524.             -annotation (getRunTimeCommandAnnotation("CreateText"))
  525.             -image      "text.xpm"
  526.             -command                ("CreateText")
  527.             -dragMenuCommand        ("performtextCurves 2")
  528.             -dragDoubleClickCommand ("CreateTextOptions");
  529.  
  530.         menuItem -optionBox true -image "text.xpm"
  531.             -annotation (getRunTimeCommandAnnotation("CreateTextOptions"))
  532.             -command    ("CreateTextOptions");
  533.  
  534.         menuItem -divider true;
  535.     }
  536.     setParent -menu ..;    
  537. }
  538.  
  539. proc ModLocatorAndConstrPlaneMenuItem( string $parent )
  540. //
  541. // Description :
  542. //        To create locator and construction plane
  543. //
  544. {
  545.     setParent -menu $parent ;
  546.  
  547.     menuItem -label "Construction Plane"
  548.         -annotation (getRunTimeCommandAnnotation("CreateConstructionPlane"))
  549.         -image      "sketchPlane.xpm"
  550.         -command                ("CreateConstructionPlane")
  551.         -dragMenuCommand        ("performCreateConstructionPlane 2")
  552.         -dragDoubleClickCommand ("CreateConstructionPlaneOptions");
  553.  
  554.     menuItem -optionBox true -image "sketchPlane.xpm"
  555.         -annotation (getRunTimeCommandAnnotation("CreateConstructionPlaneOptions"))
  556.         -command    ("CreateConstructionPlaneOptions");
  557.  
  558.     menuItem -label "Locator"
  559.         -annotation (getRunTimeCommandAnnotation("CreateLocator"))
  560.         -image      "locator.xpm"
  561.         -command    ("CreateLocator");
  562.  
  563.     menuItem -label "Annotation..."
  564.         -annotation (getRunTimeCommandAnnotation("CreateAnnotateNode"))
  565.         -image      "annotation.xpm"
  566.         -command    ("CreateAnnotateNode");
  567.  
  568.     menuItem -divider true;
  569.  
  570.     setParent -menu ..;    
  571. }
  572.  
  573.  
  574. proc ModSetsMenuItem( string $parent )
  575. //
  576. // Description :
  577. //        To create sets and other grouping things
  578. //
  579. {
  580.     setParent -menu $parent ;
  581.  
  582.     //    Empty Group
  583.     //
  584.     menuItem -label "Empty Group"
  585.         -annotation (getRunTimeCommandAnnotation("CreateEmptyGroup"))
  586.         -echoCommand true
  587.         -command     ("CreateEmptyGroup");
  588.  
  589.     menuItem -label "Sets" -subMenu true -tearOff true -allowOptionBoxes true;
  590.  
  591.     //    Sets
  592.     //
  593.     menuItem -label "Set"
  594.         -annotation (getRunTimeCommandAnnotation("CreateSet"))
  595.         -command    ("CreateSet")
  596.         -dragDoubleClickCommand ("CreateSetOptions");
  597.  
  598.     menuItem -optionBox true 
  599.         -annotation (getRunTimeCommandAnnotation("CreateSetOptions"))
  600.         -command    ("CreateSetOptions");
  601.  
  602.     menuItem -label "Partition"
  603.         -annotation (getRunTimeCommandAnnotation("CreatePartition"))
  604.         -command    ("CreatePartition")
  605.         -dragDoubleClickCommand ("CreatePartitionOptions");
  606.  
  607.     menuItem -optionBox true 
  608.         -annotation (getRunTimeCommandAnnotation("CreatePartitionOptions"))
  609.         -command    ("CreatePartitionOptions");
  610.  
  611.     menuItem -label "Quick Select Set..."
  612.         -annotation (getRunTimeCommandAnnotation("CreateQuickSelectSet"))
  613.         -command    ("CreateQuickSelectSet");
  614.  
  615.     setParent -menu ..;    
  616. }
  617.  
  618. proc ModCameraMenuItem( string $parent )
  619. //
  620. //    Description ; To create a camera.
  621. {
  622.     setParent -menu $parent ;
  623.  
  624.     menuItem -label "Cameras" -subMenu true -tearOff true -allowOptionBoxes true;
  625.  
  626.     menuItem -label "Camera"
  627.         -annotation (getRunTimeCommandAnnotation("CreateCameraOnly"))
  628.         -image      "view.xpm"
  629.         -command    ("CreateCameraOnly")
  630.         -dragMenuCommand        ("performCameraOnly 2")
  631.         -dragDoubleClickCommand ("CreateCameraOnlyOptions");
  632.  
  633.     menuItem -optionBox true -image "view.xpm"
  634.         -annotation (getRunTimeCommandAnnotation("CreateCameraOnlyOptions"))
  635.         -command    ("CreateCameraOnlyOptions");
  636.  
  637.     menuItem -label "Camera and Aim"
  638.         -annotation (getRunTimeCommandAnnotation("CreateCameraAim"))
  639.         -image      "view.xpm"
  640.         -command    ("CreateCameraAim")
  641.         -dragMenuCommand        ("performCameraAim 2")
  642.         -dragDoubleClickCommand ("CreateCameraAimOptions");
  643.  
  644.     menuItem -optionBox true -image "view.xpm"
  645.         -annotation (getRunTimeCommandAnnotation("CreateCameraAimOptions"))
  646.         -command    ("CreateCameraAimOptions");
  647.  
  648.     menuItem -label "Camera, Aim, and Up"
  649.         -annotation (getRunTimeCommandAnnotation("CreateCameraAimUp"))
  650.         -image      "view.xpm"
  651.         -command    ("CreateCameraAimUp")
  652.         -dragMenuCommand        ("performCamera 2")
  653.         -dragDoubleClickCommand ("CreateCameraAimUpOptions");
  654.  
  655.     menuItem -optionBox true -image "view.xpm"
  656.         -annotation (getRunTimeCommandAnnotation("CreateCameraAimUpOptions"))
  657.         -command    ("CreateCameraAimUpOptions");
  658.  
  659.     setParent -menu ..;    
  660.  
  661.     // add divider.
  662.     //
  663.     menuItem -divider true ;
  664.  
  665.     setParent -menu ..;    
  666. }
  667.  
  668. global proc ModCreateMenu( string $parent )
  669. {
  670.     if( `menu -q -ni $parent` != 0 ) {
  671.         //
  672.         //    Menu is built already - just return
  673.         //
  674.         return;
  675.     }
  676.     ModNurbsPrimitiveMenuItem( $parent ) ;
  677.     ModPolyPrimitiveMenuItem( $parent ) ;
  678.     ModSubdPrimitiveMenuItem( $parent ) ;
  679.     ModVolumePrimitiveMenuItem( $parent ) ;
  680.     ModLightsMenuItem( $parent ) ;
  681.     ModCameraMenuItem( $parent ) ;
  682.     ModCurveToolsMenuItem( $parent ) ;
  683.     ModTextMenuItem( $parent ) ;
  684.     ModLocatorAndConstrPlaneMenuItem( $parent ) ;
  685.     ModSetsMenuItem( $parent ) ;
  686. }
  687.